import {createApp} from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as VueRouter from 'vue-router'

import Main from './views/main.vue';
import FlowView from './views/flow/flow.vue';
import Fun2 from './views/fun2/index.vue';
import DragEdit from './views/drag_edit/drag_edit.vue';
import LitegraphIndex from './views/litegraph_index/litegraph_index.vue';
import LitegraphCustomNode from './views/litegraph_index/custom_node.vue';
import LitegraphDemo from './views/litegraph_index/demo.vue';
import LitegraphFlow from './views/litegraph_index/litegraph_flow.vue';

const app = createApp(App)

const router = VueRouter.createRouter({
    history: VueRouter.createWebHashHistory(),
    routes: [
        {
            path: '/',
            meta: {title: '目录', noCache: false},
            component: Main,
            children: [
                {
                    path: '/flow',
                    meta: {title: 'flow', noCache: false},
                    component: FlowView,
                }, {
                    path: '/Fun2',
                    meta: {title: 'Fun2', noCache: false},
                    component: Fun2,
                }, {
                    path: '/DragEdit',
                    meta: {title: 'DragEdit', noCache: false},
                    component: DragEdit,
                }, {
                    path: '/litegraph',
                    meta: {title: 'litegraph', noCache: false},
                    component: LitegraphIndex,
                }, {
                    path: '/litegraph/custom_node',
                    meta: {title: 'custom_node', noCache: false},
                    component: LitegraphCustomNode,
                },{
                    path: '/litegraph/demo',
                    meta: {title: 'demo', noCache: false},
                    component: LitegraphDemo,
                },{
                    path: '/litegraph/flow',
                    meta: {title: 'flow', noCache: false},
                    component: LitegraphFlow,
                },
            ]
        },

    ]
})

app.use(ElementPlus)
app.use(router)
app.mount('#app')
